<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Check No Stock</title>

</head>
<body style="font-family:Arial, Helvetica, sans-serif;">

<h2><?php echo $this->shop ." no Stock no Order check"?></h2>
<?php $i = 1;$y = 1;?>
<form method = "post" action = "">
<?php if(empty($this->addOrderList)){?>
<table width="900" border="1" cellspacing="1" cellpadding="5">
	<tr>
		<th>No.</th>
		<th>Barcode</th>
		<th>Description</th>
		<th>WH Stock</th>
		<th colspan = "2">Action</th>
	</tr>
	<?php foreach ($this->list as $idCate => $detail){?>
			<tr style=" background-color:#80FF80">
 				<td colspan = "7" align = "center"><strong style="line-height:25px; display:inline-block; font-size:18px;"><?php echo $this->arrOrderCate[$idCate];?></strong></td>
			</tr>
			<?php foreach ($detail as $k => $v){?>
			<tr>
				<td><?php echo $i++?></td>
				<td><?php echo $v['code_product']?></td>
				<td><?php echo $v['DESCRIPT']?></td>
				<td><?php echo (int)$v['BALANCE']?></td>
				<td><input type = "checkbox" name = "add_order[<?php echo $v['code_product']?>]"></input></td>
				<td>Qty:<input type = "text" size = "3" name = "add_qty[<?php echo $v['code_product']?>]" value = "0"></input></td>
			</tr>	
			<?php }?>
	<?php }?>
</table>
<br/>
<input type = "submit" name = "submit" value = "Add to Order"></input>
<?php }else{?>
<h2><?php echo $this->shop?> Add to Order List</h2>
		<table width="900" border="1" cellspacing="1" cellpadding="5">
			<tr>
				<th>No.</th>
				<th>Barcode</th>
				<th>Description</th>
				<th>Order Qty</th>
			</tr>		
			<?php foreach ($this->addOrderList as $code => $value){?>
				<tr>
					<td><?php echo $y++;?></td>
					<td><?php echo $code?></td>
					<td><?php echo $value['des']?></td>
					<td><?php echo $value['qty']?></td>
				</tr>
			<?php }?>
		</table>
<?php }?>
</form>
</body>
</html>
